
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %> 
<%@ page import="data.BitacoraDataMapper" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="arivp89.css" media="screen" />
        <title>Carta al Estudiante</title>
    </head>
    <body>
    <%
        BitacoraDataMapper mapper = new BitacoraDataMapper();
        ResultSet rs = mapper.obtenerCartaEstudiante(request.getSession().getAttribute("BitID").toString());
        
    %>
        <html:form action="/CartaEstudiante" method="post">
            <h1>Carta al Estudiante</h1>
        <table border="0" width="100" cellspacing="10" cellpadding="5">
            <% if(rs.next()){ %>
            <tbody>
                <tr>
                    <td>Sigla</td>
                    <td><% out.println(rs.getString(1)); %></td>
                    <td>Contenido actual:</td>
                </tr>
                <tr>
                    <td>Oficina</td>
                    <td><input type="text" name="oficina" value="" size="50" /></td>
                    <td> <% out.println(rs.getString(2)); %></td>
                </tr>
                <tr>
                    <td>Horas de Consulta</td>
                    <td><input type="text" name="horas" value="" size="50" /></td>
                    <td> <% out.println(rs.getString(3)); %></td>
                </tr>
                <tr>
                    <td>Contenido</td>
                    <td><textarea name="contenido" rows="10" cols="50" ></textarea></td>
                    <td> <% out.println(rs.getString(4)); %></td>
                </tr>
                <tr>
                    <td>Objetivos</td>
                    <td><textarea name="objetivos" rows="10" cols="50" ></textarea></td>
                    <td> <% out.println(rs.getString(5)); %></td>
                </tr>
                <tr>
                    <td>Metodologia</td>
                    <td><textarea name="metodologia" rows="10" cols="50" ></textarea></td>
                    <td> <% out.println(rs.getString(6)); %></td>
                </tr>
                <tr>
                    <td>Evaluacion</td>
                    <td><textarea name="evaluacion" rows="10" cols="50" ></textarea></td>
                    <td> <% out.println(rs.getString(7)); %></td>
                </tr>
                <tr>
                    <td>Bibliografia</td>
                    <td><textarea name="bibliografia" rows="10" cols="50" ></textarea></td>
                    <td> <% out.println(rs.getString(8)); %></td>
                </tr>
                <tr>
                    <td>Cronograma</td>
                    <td><textarea name="cronograma" rows="10" cols="50" ></textarea></td>
                    <td> <% out.println(rs.getString(9)); %></td>
                </tr>
            </tbody>
            <% } %>
        </table><br>
        <input type="submit" value="Guardar Cambios" /><html:errors />
        </html:form>
        <br><br>
        <html:link page="/ModificarBitacoraIndex.jsp"><- Atrás</html:link>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <div id="bottom">
            Creado por: Alejandro Rivera, Franklin Alfaro. ECCI, UCR.
            <br>
        </div>
    </body>
</html>
